package test.company;

/**
 * @author oldliu
 * @since 1.0
 */
public class ThreadSaver extends Thread {
    private final Company com;

    public ThreadSaver(Company c){
        this.com=c;
    }

    @Override
    public void run() {
        while (true){
            try {
                Thread.sleep(10000);
                Company.store(com);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
